package com.koron.common.core.util.qywx;

import com.koron.common.core.business.configsettings.utils.ConfigInfoTool;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName QywxProperties
 * @description
 * @Author zhouj
 * @Date 2021/12/2 17:05
 */
@Component
public class QywxProperties {

    public String getCorpId() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("corpId");
    }

    public String getCorpSecret() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("corpSecret");
    }

    public String getTokenUrl() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("getToken");
    }

    public String getJscode2sessionUrl() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("jscode2session");
    }

    public String getCodeUnLimit() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("unlimitedQRCode");
    }

    public String getsbzcglToken() {
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "wx_miniprogram");
        return map.get("getsbzcglToken");
    }

    public String getUserInfo(){
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "qywx_message");
        return map.get("getUserInfo");
    }

    public String getQYWXCorpIdSecret(){
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "qywx_message");
        return map.get("corpSecret");
    }

    public String getJsTicket(){
        Map<String, String> map = ConfigInfoTool.getConfigByCode("common", "qywx_message");
        return map.get("getJsTicket");
    }
}
